package org.begincode.course.handler;

import org.begincode.core.model.WordChapter;
import org.begincode.course.service.ChapterService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by yangsj on 2016/5/1.
 */
@Component
public class ChapterHandler {
    @Resource
    private ChapterService chapterService;

    public List<WordChapter> getWordChaptersByCourseId(int courseId){
        return chapterService.selectWordChaptersByCourseId(courseId);
    }

    public WordChapter getWordChapterById(int chapterId){
        return chapterService.selectWordChapterById(chapterId);
    }
}
